﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Entities;
using DAL;

namespace QuanLyBilliards_Coffee
{
    public partial class FromDangNhap : Form
    {
        public FromDangNhap()
        {
            InitializeComponent();
        }
        private bool KiemTraTimKiemTaiKhoan(ref string s)
        {
            s = "";
            if (cbbKieuTimKiemTaiKhoan.SelectedIndex <= 0)
                s += "Bạn chưa chọn kiểu tìm kiếm";
            if (cbbKieuTimKiemTaiKhoan.SelectedIndex > 1 && XuLyChuoiVao.CatKhoangTrangDu(txtTimKiemTaiKhoan.Text) == "")
                s += "\nBạn chưa nhập thông tin tìm kiếm";
            if (s == "")
                return true;
            else
                return false;
        }
        private void btnTimKiemTK_Click(object sender, EventArgs e)
        {
            string s = "";

            if (!KiemTraTimKiemTaiKhoan(ref s))
            {
                MessageBox.Show(s);
            }
            else
            {
                MessageBox.Show("bạn chưa xử lý tìm kiếm");
            }
        }

        private void btnOKDN_Click(object sender, EventArgs e)
        {

        }

        private void btnThemTK_Click(object sender, EventArgs e)
        {
            lblUser.Visible = true;
            lblPass.Visible = true;
            txtUserName.Visible = true;
            txtPassWord.Visible = true;
            btnOKDN.Visible = true;
        }
       
    }
}
